package org.wzl.service.service;

import com.fasterxml.jackson.core.type.TypeReference;

import java.util.concurrent.TimeUnit;

public interface CacheService {

    void set(String key, Object value, long expire, TimeUnit timeUnit);

    <T> T get(String key, TypeReference<T> typeReference);

    void remove(String key);

    Boolean exists(String key);

    boolean setIfAbsent(String key, Object value, long expire, TimeUnit timeUnit);

}
